﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeFound
{
    public class ActionDesign : Controller
    {
        public string a;
        public int b;
        public void Index()
        {
            int c;
        }
    }
    public class Controller
    {
        public string d;
        public ActionDesign c1;
        public long dd { get; set; }
        public int a2;
    }

    public interface IHttpWriter
    {
        void Write(string obj);
        void WriteResponseHeader(string key, string value);
        void WriteResponseHeader(IDictionary<string, string[]> headers);
        void WriteResponseStatusCode(int statusCode);
    }
    public delegate void ExecuteDelegate<T>(IAction action,T t);
    public class CoreAction
    {
        public static string key;
        public string url;
        public CoreAction(string url)
        {
            this.url = url;
        }
        public static string GetUrl(int a,int b)
        {
            return $"{key}/{a}/{b}.html";
        }
        
        public void Index(int a,int b)
        {
            
        }
    }
    public static class CoreAction_Extend
    {
        public static void Execute(CoreAction action, IDictionary<string, object> env)
        {
            int a = 0; int b = 1;
            action.Index(a, b);
        }
    }
    public class AppStart
    {
        public void Init()
        {
            Dictionary<string, ExecuteDelegate<IDictionary<string, object>>> dic = new Dictionary<string, ExecuteDelegate<IDictionary<string, object>>>();
            string url = "";
        }
    }
}
